﻿<Page x:Class="MediaLibrary.ArtistInformationPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	  Title="ArtistInfoPage">
    <Page.Resources>
        <Style TargetType="{x:Type TabItem}" >
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <Grid>
                            <Border 
                             Name="Border"
                             Background="Transparent"
                             BorderBrush="Black" 
                             BorderThickness="1 1 1 1">
                                <Label x:Name="ContentSite"
                                   VerticalAlignment="Center"
                                   HorizontalAlignment="Center"
                                   Content="{TemplateBinding TabItem.Header}"
                                   Foreground="White"
                                   FontSize="20"/>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter TargetName="Border" Property="Background" Value="Transparent" />
                                <Setter TargetName="ContentSite" Property="Foreground" Value="White" />
                                <Setter TargetName="ContentSite" Property="FontWeight" Value="Bold" />
                            </Trigger>
                            <Trigger Property="IsSelected" Value="False">
                                <Setter TargetName="Border" Property="Background" Value="Transparent" />
                                <Setter TargetName="ContentSite" Property="Foreground" Value="White" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Page.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0" Background="Black" Opacity="0.7">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200" />
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="65" />
                <RowDefinition Height="*"/>
                <RowDefinition Height="150" />
                <RowDefinition Height="30" />
            </Grid.RowDefinitions>

            <TextBlock x:Name="artistNameTextBlock" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Foreground="White" FontSize="40" Margin="6" />

            <Image x:Name="artistImage" Grid.Row="1" Grid.Column="0" Margin="6" VerticalAlignment="Top" Width="187" Height="187" Stretch="Uniform" />

            <TabControl Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Background="Transparent" Margin="0 0 6 0" >
                <TabItem Header="bio" HorizontalContentAlignment="Right">
                    <ScrollViewer x:Name="descriptionScrollViewer"  ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible">
                        <TextBlock x:Name="descriptionTextBlock" FontSize="12" Foreground="White" Opacity="1.0" Padding="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="Wrap"/>
                    </ScrollViewer>
                </TabItem>
                <TabItem Header="events">
                    <ListView x:Name="eventListView" 
                         ScrollViewer.CanContentScroll="False"
                         Background="Transparent"
                         BorderThickness="0"
                         ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                         Margin="7 0 0 0"
                         HorizontalContentAlignment="Stretch"
                         ItemTemplate="{StaticResource eventDataTemplate}"
                         ItemContainerStyle="{DynamicResource eventSelectedStyle}">
                    </ListView>
                </TabItem>
            </TabControl>

            <StackPanel Grid.Row="2" Grid.RowSpan="2" Margin="6" VerticalAlignment="Top">
                <Label Foreground="White">related artists</Label>
                <StackPanel Background="Transparent" Margin="10 0 0 0">
                    <ToggleButton x:Name="similarBand1" Template="{StaticResource similarArtistButton}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Click="similarBand_Click" />
                    <ToggleButton x:Name="similarBand2" Template="{StaticResource similarArtistButton}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Click="similarBand_Click" />
                    <ToggleButton x:Name="similarBand3" Template="{StaticResource similarArtistButton}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Click="similarBand_Click" />
                    <ToggleButton x:Name="similarBand4" Template="{StaticResource similarArtistButton}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Click="similarBand_Click" />
                    <ToggleButton x:Name="similarBand5" Template="{StaticResource similarArtistButton}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Click="similarBand_Click" />
                </StackPanel>
            </StackPanel>
            
            <TextBlock x:Name="tagsLabel" Grid.Row="3" Grid.Column="1" Foreground="Wheat" FontSize="12" Margin="18 6 6 6" />
        </Grid>

        <Grid Grid.Row="1" Margin="0,5,0,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="85" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Button x:Name="refreshButton" Grid.Column="0" Click="refreshButton_Click">Refresh</Button>

            <Label Grid.Column="4" HorizontalAlignment="Right" Margin="0,0,0,0">This information is provided by Last.fm</Label>
        </Grid>
    </Grid>    
</Page>
